package com.authine.cloudpivot.ext.service;

import com.authine.cloudpivot.ext.domain.query.GoodsInputQuery;
import com.authine.cloudpivot.ext.domain.query.GoodsQuery;
import com.authine.cloudpivot.ext.domain.query.MallQuery;
import com.authine.cloudpivot.ext.domain.vo.*;
import com.authine.cloudpivot.ext.dto.GatewayResponse;
import com.authine.cloudpivot.ext.enums.order.CartTypeEnum;
import com.authine.cloudpivot.ext.model.goods.GoodsFullModel;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface ExternalInterfaceService {

    /**
     * 查询企业采购单
     *
     * @param customerOrgIds
     * @param vendorOrgIds
     * @param inquiryMemberId
     * @return
     */
    List<GoodsPurchaseVO> queryPurchaseByQuotationIds(List<String> quotationIdList,
                                                      List<String> customerOrgIds,
                                                      List<String> vendorOrgIds,
                                                      List<String> inquiryMemberId);

    /**
     * 定标商品根据客户商品料号和公司查询定标商品
     *
     * @param map
     * @return
     */
    Set<ShopVo> getShopVoByCompanyAndCustomerSku(Set<Map<String, Object>> map);

    /**
     * 查询购物车列表
     *
     * @param type
     * @return
     */
    List<CartVo> getCartList(CartTypeEnum type);

    /**
     * 根据条件查询采购目录
     *
     * @param
     * @return
     */
    GatewayResponse<List<ShopVo>> shopGoodsPage(String customerSku, String brand, String catalog, String name, String model, String spec,
                                                Integer type, Integer page, Integer pageSize);


    /**
     * 批量删除供应商商品
     *
     * @return
     */
    GatewayResponse vendorGoodsDelete(List<String> goodsIds, List<String> clientGoodsIds);

    /**
     * 批量修改供应商商品
     *
     * @param vendorGoodsList
     * @return
     */
    GatewayResponse toUpdateGoods(List<VendorGoodsVO> vendorGoodsList);

    /**
     * 分页查询供应商商品
     *
     * @param pageable
     * @param goodsQuery
     * @return
     */
    GatewayResponse<List<VendorGoodsV1VO>> pagedGoods(Pageable pageable, GoodsQuery goodsQuery);

    /**
     * 批量保存供应商商品
     *
     * @param list
     * @return
     */
    GatewayResponse saveGoodsList(List<GoodsInputQuery> list) throws Exception;

    /**
     * 根据商品id查询商品详情
     *
     * @param id
     * @return
     */
    GatewayResponse<List<GoodsFullModel>> pageMallGoodsByIds(String id, Boolean restrictedBrands);

    /**
     * 分页查商城商品
     *
     * @param query
     * @return
     */
    GatewayResponse<MallGoodsVO> pageMallGoods(MallQuery query);

    /**
     * 客户创建订单
     */
    GatewayResponse createOrder(List<String> cartId);
}
